Deep Learning for Beginners: An Easy Guide to Go Through the Artificial Intelligence Revolution that Is Changing the Game, Using Neural Networks with Python, Keras and TensorFlow by Russel R. Russo

Deep Learning for Beginners: An Easy Guide to Go Through the Artificial Intelligence Revolution that Is Changing the Game, Using Neural Networks with Python, Keras and TensorFlow by Russel R. Russo

Author:Russel R. Russo [Russo, Russel R.]
Language: eng
Format: azw3, pdf
Published: 2019-11-17T16:00:00+00:00


Training the algorithm

Now that the features are scaled down, it is time to train the algorithm that we are going to use. To implement the decision tree to do classification, you will need to work with the decision tree classifier from the sklearn.tree library. The following script will make sure that the right labels and features are passed on to the decision tree:

from sklearn.tree import DecisionTreeClassifier

dt_reg = DecisionTreeClassifier()

dt_reg.fit(train_features, train_labels

And the final thing that we need to do in order to get started with this part of the plan is to make predictions. We have all of the information that we need at this point, and it is time to go through and use the prediction method. With the algorithms and codes that we have been using so far, you are going to be able to make some predictions based on the data that you have, helping you to get the best information to make decisions. The code that you need to use for this will include:

predictions = dt_reg.predict(test_features)

At this point, a decision tree, with the help of Python, is going to be created for you. This is going to ensure that you will be able to see which prediction is right for you based on the information that you put in. Businesses and other companies are often going to use this to help them pick the information and the choices that are right for them. This method is faster and more accurate than what a single person is able to do, which is why they are so valuable.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.